package jwlee.testjunit;
import junit.framework.TestCase;
public class TestCalculatorByJunit extends TestCase{
	
	public void testAdd() {
		SampleCalculator calculator = new SampleCalculator();
		int result = calculator.add(50, 20);
		assertEquals(70, result);
	}

	public void testSubtration(){
		SampleCalculator calculator = new SampleCalculator();
		int result = calculator.subtration(50, 20);
		assertEquals(30, result);
	}

	public static void main(String[] args) {
		junit.swingui.TestRunner.run(TestCalculatorByJunit.class);
	}
}

class SampleCalculator{
	public int add(int augend, int addend){
		return augend + addend;
	}

	public int subtration(int minuend, int subtrahend){
		return minuend - subtrahend;
	}
}